
#ifndef UCDB_ANNOTATIONSCALE_H
#define UCDB_ANNOTATIONSCALE_H

#pragma once
#pragma pack(push, 8)

#include "zdbObjContext.h"

class UcDbImpAnnotationScale;

class UcDbAnnotationScale : public UcDbObjectContext, public UcHeapOperators
{
public:
    UCRX_DECLARE_MEMBERS(UcDbAnnotationScale);
    UcDbAnnotationScale ();
    virtual ~UcDbAnnotationScale ();
    virtual Ucad::ErrorStatus getName (UcString& name) const;
    virtual Ucad::ErrorStatus setName (const UcString& name);
    virtual ZSoft::LongPtr uniqueIdentifier () const;
    virtual UcString collectionName () const;
    virtual Ucad::ErrorStatus copyFrom ( const UcRxObject *pOther);
    virtual Ucad::ErrorStatus getPaperUnits (double& dPaperUnits) const;
    virtual Ucad::ErrorStatus setPaperUnits (double dPaperUnits);
    virtual Ucad::ErrorStatus getDrawingUnits (double&  dDrawingUnits) const;
    virtual Ucad::ErrorStatus setDrawingUnits (const double dDrawingUnits);
    virtual Ucad::ErrorStatus getScale (double& dScale) const;
    virtual Ucad::ErrorStatus  getIsTemporaryScale (bool& bTemporary) const;
    virtual bool matchScaleId(ZSoft::LongPtr id) const;
protected:
    UcDbImpAnnotationScale* mpImp;
    friend class UcDbSystemInternals;
    UcDbAnnotationScale ( bool );

};

// Notification of Annotation Scale change.
class UCDB_PORT UcDbAnnotationScaleReactor: public UcRxObject
{
public:
	UCRX_DECLARE_MEMBERS(UcDbAnnotationScaleReactor);

	virtual void annotationScaleChanged (const UcDbDatabase* pDb,
		const UcDbViewport* pVP, 
		const UcDbAnnotationScale* pScale,
		const bool bInitializing);
};

UCDB_PORT bool ucdbAddAnnotationScaleReactor(UcDbAnnotationScaleReactor *pReactor);

UCDB_PORT bool ucdbRemoveAnnotationScaleReactor(UcDbAnnotationScaleReactor *pReactor);

#pragma pack(pop)

#endif
